from django.db import models


# Create your models here.


class User(models.Model):
    username = models.CharField(max_length=50)
    password = models.CharField(max_length=255)

    class Meta:
        db_table = 'user'


class Shop(models.Model):
    name = models.CharField(max_length=10)
    price = models.DecimalField(max_digits=7, decimal_places=2)
    pic = models.ImageField()
    user = models.ForeignKey(User, on_delete=models.CASCADE)

    class Meta:
        db_table = 'shop'
